class CreateProjects < ActiveRecord::Migration
  def self.up
    create_table :projects do |t|
      t.string :name
      t.text :remark
      t.integer :paused_stages_count,
        :paying_stages_count,
        :payed_stages_count
      t.decimal :payed_total_amount, :precision => 8, :scale => 2, :default => 0
      t.decimal :paying_total_amount, :precision => 8, :scale => 2, :default => 0
      t.decimal :paused_total_amount, :precision => 8, :scale => 2, :default => 0
      t.integer :position
      t.timestamps
    end
  end

  def self.down
    drop_table :projects
  end
end
